< previous page page_310 next page >

Page 310
EXERCISE
Moving Menus from One Form to Another
1. Open the Employee Information form in Notepad or WordPad. When you look at this form, youll find a lot of definitions for the different controls contained on the form.
2. Look down quite a ways through these definitions until you find the definition VB.Menu mnuFile. This is where your menus begin. Heres an example:
Begin VB.Menu mnuFile
Caption = "&File"
Begin VB.Menu mnuFEmp
Caption = "&Employee"
End
Begin VB.Menu mnuFSep1
Caption = "-"
End
Begin VB.Menu mnuFExit
Caption = "E&xit"
Shortcut = ^X
End
End
Begin VB.Menu mnuEdit
Caption = "&Edit"
Begin VB.Menu mnuECut
Caption = "Cu&t"
End
Begin VB.Menu mnuECopy
Caption = "&Copy"
End
Begin VB.Menu mnuEPaste
Caption = "&Paste"
End
End
...
...
...
analysis.gifThis code shows how Visual Basic stores the information for your menus. Its pretty easy to figure out how this information is stored. Visual Basic simply lists the menu name and then indented under that menus into another form is a list of the drop-down menu items.

 
< previous page page_310 next page >

If you like this book, buy it!